<?php
include_once("../service/productService.php");
include_once("../util/constant.php");

$proStatId = $_POST["proStatId"];
$name = $_POST["name"];

if(updateStatusOfProduct($proStatId, $name)){
    echo "<script>window.location.href = '../admin/product-status-detail.php?action=".UPDATE_SUCCESSFULLY."&id=".$proStatId."';</script>";
}
else {
    echo "<script>window.location.href = '../admin/product-status-detail.php?action=".UPDATE_FAILED."&id=".$proStatId."';</script>";
}
?>